﻿#include <stdio.h>

int max(int x0, int x1, int x2, int x3, int x4)
{
	int i, m, b[5];
	m = b[0] = x0;
	b[1] = x1;
	b[2] = x2;
	b[3] = x3;
	b[4] = x4;
	for (i = 1; i < 5; i++)
		if (b[i] > m) m = b[i];

	x0 = x1 = x2 = x3 = x4 = 0;
	return m;
}
int main()
{
	int m, a[6] = { 23, 45, 89, 12, 34 };
	m = max(a[0], a[1], a[2], a[3], a[4]);
	printf("The element with max value in array a is"
	       ", Its value is %d\n", m);
}


